package com.scsystem.xysc.mapper;

import com.scsystem.xysc.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
* @author sky
* @description 针对表【user】的数据库操作Mapper
* @createDate 2023-09-16 15:57:05
* @Entity com.scsystem.xysc.pojo.User
*/
@Mapper
public interface UserMapper extends BaseMapper<User> {

  User userLogin(@Param("userName")String name,@Param("password") String password);
  User userByName(@Param("name") String name);
  int userUpdateById(User user);
  @Update("update user set avatar=#{image} where user_id=#{id}")
  int updateImage(String image, Long id);

  int deleteByUserId(Long userId);
}




